# Document.pm
package Document;
use strict;

# scalar constructor
sub new {
  my $class = shift;

  my $self;
  if (my $fh = shift) {
     local $/ = undef;
     $$self = <$fh>;
  }

  return bless $self, $class;
}
